<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
  <head>
  </head>
  <body>
  
  <h2>Host list</h2>
  <table id='tableservices'>
    <tr>
      <th></th>
      <th>IP Address</th>
      <th>Mac Address</th>
    </tr>
    <xsl:for-each select="IfaceMap/Host">
    <tr>
      <td>
      <xsl:if test="@Gw='true'">
	 <img src="images/gw.png" width='30px' height='30px'/> 
      </xsl:if>
      <xsl:if test="@Me='true'">
	 <img src="images/home.png" width='30px' height='30px' /> 
      </xsl:if>
      <xsl:if test="not(@Me) and not(@Gw)">
	<img src="images/host.png" width='30px' height='30px'/> 
      </xsl:if>
      <xsl:value-of select="Me"/>
      </td>

      <td><b><xsl:value-of select="IPAddr"/></b></td>
      <td><xsl:value-of select="@MacAddr"/></td>
      <td width='25%'><i><xsl:for-each select="Service">
	<xsl:value-of select="Name"/> 
      </xsl:for-each></i></td>

    </tr>
    </xsl:for-each>
  </table>


  <h2>Connection list</h2>
  <table>
    <tr>
      <th>IP1</th>
      <th>IP2</th>
      <th>Service</th>
    </tr>
    <xsl:for-each select="IfaceMap/Connection">
      <tr>
	<td width='100px'><b><xsl:value-of select="IP1"/></b>:<xsl:value-of select="Port1"/></td>
	<td><xsl:value-of select="IP2"/>:<xsl:value-of select="Port2"/></td>
	<td><xsl:value-of select="ServiceName"/></td>

      </tr>
    </xsl:for-each>
  </table>


  </body>
  </html>
</xsl:template>

</xsl:stylesheet>